package com.zxy.permission_stu.service.impl;

import com.zxy.permission_stu.entity.Classes;
import com.zxy.permission_stu.mapper.ClassesMapper;
import com.zxy.permission_stu.service.IClassesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lenovo
 * @since 2021-11-30
 */
@Service
public class ClassesServiceImpl extends ServiceImpl<ClassesMapper, Classes> implements IClassesService {

    @Autowired
    private ClassesMapper classesMapper;

    @Override
    @Cacheable("classes")
    public List<Classes> listAll() {
        List<Classes> list = classesMapper.listAll();
        return list;
    }
}
